<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/webApp/head.jsp" %>
<style> 
		.list-curr{ background: #fff; display: block; border-right: 0;}
		.gm-head-right{ color: #2b2a2a;}
		.gm-head-right a{ color: #2b2a2a;}
		.joan-head{ background: #fff;}
		.gm-head-search input{ border: 1px solid #599a3c;}
		.gm-head-left a, .gm-head-right a{ color: #599a3c;}
		</style>
<script >
  function searchComm(){

 var text=$("input[name='text']").val(); 

	  if(text!=""){
	  location.href='/shoeHouse/home/commodifySearch?text='+text+'&page=1&rows=20';
	  }else{
		  alert("请输入搜索内容");
	  } 
  }
  
  
  
  </script>
</head>
	<body class="gudin am-with-fixed-navbar" >
		<header data-am-widget="header" class="am-header am-header-default joan-head" style="z-index:999;position: fixed; top: 0; left: 0;border: 1px solid #ddd;">
			<div class="gm-head-left">
				<a href="#left-link" class=""><i class="am-icon-map-marker"></i>南昌</a>
			</div>
			<div class="gm-head-search">
			
					<input type="text" name="text" placeholder="寻找你喜欢的商品">	<a href="#"  onclick="searchComm()"><i class="am-icon-search"></i></a>
			</div>

			<div class="gm-head-right">
				<a href="login.html">登陆</a> /<a href="reg.html">注册</a>
			</div>
		</header>
		<div class="list-content">
			 <div class="list-left">
			 	 <li ${style}><a href="/shoeHouse/home/commodify?cate=all&page=1&rows=20" >全部商品</a></li>
			 	 <li ${stylegril} ><a href="/shoeHouse/home/commodify?cate=gril&page=1&rows=20">女鞋</a></li>
			 	 <li ${styleboy}><a href="/shoeHouse/home/commodify?cate=boy&page=1&rows=20">男鞋</a></li>
			 	<c:if test="${!empty search}"> <li ${search}>搜索的商品</li></c:if>
			 	<c:if test="${!empty jingpin}"> <li ${jingpin}>精品</li></c:if>
			 </div>
			 <div class="list-right">
			 	<ul class="list-menu">
			 		<li><a href="">默认排序 </a></li>
			 		<li><a href="">口碑值</a><i class="list-menu-arrow"></i></li>
			 		<li><a href="">价格</a><i class="list-menu-arrow"></i></li>
			 		<li><a href="">新品</a><i class="list-menu-arrow"></i></li>
			 		<li><a href="">收藏</a><i class="list-menu-arrow"></i></li>
			 	</ul>
			 	
			 	<c:forEach  items="${allCommodify}" var="all">
			 	<ul><!--ul-->
			 		<li class="zm">
			 		 <a href="/shoeHouse/home/commodifyContent?id=${all.id }&page=1&rows=10" class="">
			 			<div class="zm-l">
			 				<div class="pro-img" ><img src="${all.picture }"/></div>
			 				<div class="pro-con">
			 					<h2 class="pro-deta" data-id="{$val.id}">${all.name} </h2>
			 					<p class="pro-num" data-id="{$val.id}">${all.inventoryNum}/${all.orderNum} </p>
			 					<p><span>￥${all.price} </span><del>￥108</del></p>
			 				</div>
			 				</a>
			 			</div>
			 			<!-- <div class="zm-r">
			 				<a class="zm-r-j">-</a>
			 				<a class="zm-r-num">0</a>
			 				<a class="zm-r-j">+</a>
			 			</div> -->
			 		</li>
			 		
			 		 </c:forEach>
			 		
			 	</ul><!--ul-->
			 	<!-- 分页 -->
			 	<ul data-am-widget="pagination" class="am-pagination am-pagination-default">
			 	 
			 	 <c:if test="${page>1}">
			 	 <li class="am-pagination-prev ">
			 	   <a href="/shoeHouse/home/commodify?cate={cate}&page=${page-1}&rows=20">上一页</a>
  </li>
			 	 </c:if>
			 	
   <c:if test="${count>20}">
  <li class="am-pagination-next ">
    <a href="/shoeHouse/home/commodify?cate=${cate}&page=${page+1}&rows=20">下一页</a>
  </li>
   </c:if>
			 		     
			 	</ul>
			 	 <li style="height: 20px;"></li>
			 </div>
		</div>
		
  <%@include file="/webApp/bottom.jsp" %>
  
<!-- <script type="text/javascript">
			$(function(){				
				$('.pro-deta').click(function(){
					 var id = $(this).data('id');
					 var $modal = $('.st-pop-'+id);
					 var pop_height = $('.st-slider-box-'+id).height();
//		 			 console.log(pop_height);
					 $('.st-pop-'+id+' .am-modal-bd').html($('.slide-'+id).html());
					 $modal.modal();					 
					 $('.st-slider-'+id).flexslider();
				})
				 
			$('.pro-img').click(function(){
					 var id = $(this).data('id');
					 var $modal = $('.st-pop-'+id);
					 var pop_height = $('.st-slider-box-'+id).height();
//		 			 console.log(pop_height);
					 $('.st-pop-'+id+' .am-modal-bd').html($('.slide-'+id).html());
					 $modal.modal();					 
					 $('.st-slider-'+id).flexslider();
			}) 
			}
</script> -->
	</body>

</html>